package bean;

/**
 * 商品明细实体类
 * @author Administrator
 *
 */
public class GoodDetails implements Cloneable,Comparable<GoodDetails> {
	//客户名称
	private String customer;
	//商品编码
	private String goodCode;
	//商品名称
	private String goodName;
	//规格
	private String standard;
	//单位
	private String dw;
	//单价
	private String price;
	//数量
	private String num;
	//金额
	private String amount;
	//行号
	private String xh;
	//折扣金额
	private String discount;
	//是否为促销送样
	private Boolean isPromotion = false;
	
	public Boolean getIsPromotion() {
		return isPromotion;
	}
	public void setIsPromotion(Boolean isPromotion) {
		this.isPromotion = isPromotion;
	}
	public String getDiscount() {
		return discount;
	}
	public void setDiscount(String discount) {
		this.discount = discount;
	}
	public String getXh() {
		return xh;
	}
	public void setXh(String xh) {
		this.xh = xh;
	}
	public String getCustomer() {
		return customer;
	}
	public void setCustomer(String customer) {
		this.customer = customer;
	}
	public String getGoodCode() {
		return goodCode;
	}
	public void setGoodCode(String goodCode) {
		this.goodCode = goodCode;
	}
	public String getGoodName() {
		return goodName;
	}
	public void setGoodName(String goodName) {
		this.goodName = goodName;
	}
	public String getStandard() {
		return standard;
	}
	public void setStandard(String standard) {
		this.standard = standard;
	}
	public String getDw() {
		return dw;
	}
	public void setDw(String dw) {
		this.dw = dw;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getNum() {
		return num;
	}
	public void setNum(String num) {
		this.num = num;
	}
	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
	
    public GoodDetails clone() {  
    	GoodDetails goodDetails = null;  
        try {  
        	goodDetails = (GoodDetails) super.clone();  
        } catch (CloneNotSupportedException e) {  
            e.printStackTrace();  
        }  
        return goodDetails;  
    }
	@Override
	public int compareTo(GoodDetails o) {
		if(Double.parseDouble(this.amount)>Double.parseDouble(o.amount)){
			return -1;//由高到底排序
		}else{
			return 1;
		}
	}  
}
